package org.pps.gl.client.events;

import org.pps.gl.client.LoginInfo;
import com.google.gwt.event.shared.GwtEvent;

public class RefreshUserEvent extends GwtEvent<RefreshUserEventHandler> {
	public static Type<RefreshUserEventHandler> TYPE = new Type<RefreshUserEventHandler>();

	private final LoginInfo user;

	public RefreshUserEvent(LoginInfo u) {
		this.user = u;
	}

	@Override
	public Type<RefreshUserEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(RefreshUserEventHandler handler) {
		handler.onRefresh(this);

	}

	public LoginInfo getUser() {
		return user;
	}

}
